[IA64] Check CPL for break 0x80001 case
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 1 Dec 2006 18:12:00 +0000 (11:12 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 1 Dec 2006 18:12:00 +0000 (11:12 -0700)
This is a patch which intends for fixing ltrace problem.  When I
execute a command "ltrace ps" on dom0, it makes dom0 hung.  It comes
from "break 0x80001" is shared by ltrace(CPL=3) and hpsim(CPL=2).
To avoid this problem, I just add check CPL in ia64_break_fault code.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
xen/arch/ia64/xen/faults.c

index 05aea16fc285720d1ce4739f82176e1c95510938..741800fa7054921c7abac03c138f895edfb064ab 100644 (file)
@@ -524,7 +524,9 @@ ia64_handle_break(unsigned long ifa, struct pt_regs *regs, unsigned long isr,
        struct vcpu *v = current;
        IA64FAULT vector;
 
-       if (iim == 0x80001 || iim == 0x80002) { //FIXME: don't hardcode constant
+       /* FIXME: don't hardcode constant */
+       if ((iim == 0x80001 || iim == 0x80002)
+           && ia64_get_cpl(regs->cr_ipsr) == 2) {
                do_ssc(vcpu_get_gr(current, 36), regs);
        }
 #ifdef CRASH_DEBUG